package com.example.a2023110445

import android.os.Bundle
import android.widget.Button
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity

class Activity1 : AppCompatActivity() {
    
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity1)
        
        val receivedMessageTextView: TextView = findViewById(R.id.receivedMessageTextView)
        val backButton: Button = findViewById(R.id.backButton)
        
        // Get the passed parameter from MainActivity
        val message = intent.getStringExtra("message")
        receivedMessageTextView.text = "接收到的参数: $message"
        
        backButton.setOnClickListener {
            finish()
        }
    }
}

